
import * as constants from './constants'
import { fromJS } from 'immutable'

const defaultState=fromJS({
    name:'',
    token:'',
    id:''
})

export default (state=defaultState,action)=>{

    switch (action.type){
        case constants.LOGIN:
            console.log(action.value)
            // return state.merge(action.value)
            return state.merge(action.value)
        default:
            return state
    }
}